#ifndef EVENODDMERGESORT_H
#define EVENODDMERGESORT_H

#include "array.h"
#include "sortingalgorithm.h"

class EvenOddMergeSort:public SortingAlgorithm {
private:
    int * a;
    int threadCnt;

    void sortImpl(unsigned long cnt);
    struct StackItem
    {
        int * arr;
        int * even;
        int * odd;
        unsigned long cnt;
    };

public:
    EvenOddMergeSort(int threadCnt);
    virtual ~EvenOddMergeSort();
    virtual void sort(Array * a);
};

#endif // EVENODDMERGESORT_H
